<?php
require_once("../../PathHelper.php");
require_once $rootPath.'Gazzetta.BL/RSSConfigManager.php';
require_once $rootPath.'Gazzetta.Entities/RSSSource.php';
?>
<!DOCTYPE HTML>
<head>
	<meta http-equiv="content-type" content="text/html" />
	<meta name="author" content="flavio" />

	<title>Untitled 2</title>
    <link  href="../styles/admin-panel.css" rel="StyleSheet" type="text/css"/>
    <link  href="../styles/menu.css" rel="StyleSheet" type="text/css"/>
</head>

<body>

<div id="contenedor-header">
    <div id="logo">
    
    </div>
    <div id="contenedor-header-derecho">
        <div id="nombre-usuario">
        
        </div>
        <div id="menu-principal">
        	<?php 
        	include_once("menu.php");
    		?>
        </div>
    </div>
</div>

<div id="contenedor-principal">
<h2>Nuevo Source Rss</h2>
<form action="abm-rss-sources.php" method="post">
<input type="hidden" name="accion" id="accion" value="add"/>
<fieldset>
<legend>Nuevo Source Rss</legend>
</br>

<div class="editor-label">
<label>Direccion Rss</label>
</div>

<div class="editor-field">
<input type="text" id="httpRssSource" name="httpRssSource" class="large"/>
</div>

<div class="editor-label">
<label>Titulo</label>
</div>

<div class="editor-field">
<input type="text" name="title" id="title" class="normal"/>
</div>

<div class="editor-label">
<label>Descripcion</label>
</div>

<div class="editor-field">
<input type="text" name="description" id="description" class="normal"/>
</div>


<div class="editor-label">
<label>Seccion</label>
</div>

<div class="editor-field">
<select name="idCategory" class="normal">
<?php
$manager = new RSSConfigManager();
$data = $manager->getCategories();
foreach ($data as $row) 
        {
			$id = $row->getId();
			$name = $row->getName();
			echo "<option value='$id'>$name</option>";
		}

?>
</select>
</div>

</br>
<div class="editor-field">
<input type="checkbox" value="checked" name="enabled" id="enabled"/>
<label>Habilitado</label>
</div>

</fieldset>
<input type="submit" value="Guardar">
</form>
</div>

</body>
</html>